#! /bin/sh

testname=$1
if [ -z "$testname" ]; then
	echo "Usage: ./check.sh <testname>"
	exit 1
fi

echo -n "Test ${testname}..."
Thud src/${testname}.thud | (diff -q - oracle/${testname}.out > /dev/null 2>&1)
rc=$?
if [ "$rc" = "0" ]; then
	echo "pass"
else
	echo "FAIL"
fi
exit $rc
